var mysql  = require('mysql');  
var config = require('../config_osx').mysql();
var os = require("os")
console.log(os.platform());
console.log(config);
var connection = mysql.createConnection({     
  host     : config.HOST,       
  user     : config.USER,              
  password : config.PSWD,       
  port: config.PORT,                   
  database: config.DB,
}); 
 
connection.connect();
 
var  sql = 'SELECT * FROM t_users';
//查
connection.query(sql,function (err, result) {
        if(err){
          console.log('[SELECT ERROR] - ',err.message);
          return;
        }
 
       console.log('--------------------------SELECT----------------------------');
       console.log(result);
       console.log('------------------------------------------------------------\n\n');  
});
 
connection.end();